/*Copyright (C) 2009 Careil Baptiste

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

///////////////////////////////////////////////////////////
/// \file Clock.h Ce fichier définit des fonctions et un type permettant
/// de connaitre facilement le temps écoulé entre deux portions de code.
///////////////////////////////////////////////////////////

#ifndef CSLP_CLOCK_HEADER
#define CSLP_CLOCK_HEADER

#include "dll.h"

#ifdef __cplusplus
extern "C" {
#endif

///////////////////////////////////////////////////////////
/// Définit le type CSLP_CLOCK
///
/// \sa CSLP_ResetClock(), CSLP_GetElapsedTime()
///////////////////////////////////////////////////////////
typedef double CSLP_CLOCK;

///////////////////////////////////////////////////////////
/// Permet de remettre à zeros le chronomètre.
///
/// \param clk Un pointeur sur une instance de CSLP_CLOCK.
/// \sa CSLP_GetElapsedTime()
///////////////////////////////////////////////////////////
void DLL_IMPEXP CSLP_ResetClock(CSLP_CLOCK* clk);

///////////////////////////////////////////////////////////
/// Permet de connaitre le temps écoulé en secondes depuis le 
/// dernier appelle à CSLP_ResetClock().
///
/// \param clk une instance de CSLP_CLOCK.
/// \return Le temps écoulé en secondes.
/// \sa CSLP_ResetClock()
///////////////////////////////////////////////////////////
double DLL_IMPEXP CSLP_GetElapsedTime(CSLP_CLOCK clk);

#ifdef __cplusplus
}
#endif
#endif
